<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import { useToast } from '@/lib'


const { toastList } = useToast()
</script>

<template>
  <header class="navbar bg-base-100 h-12">
    <nav class="btn btn-ghost">
      <RouterLink to="/">主页</RouterLink>
    </nav>
  </header>

  <div class="toast toast-top toast-start z-20">
    <div class="alert alert-info" v-for="toast in toastList" :key="toast.id">
      <span v-text="toast.message" />
    </div>
  </div>
  <RouterView />
</template>
